GunAppXML
This page contains some details about what the different parts of the weapon XML mean and how to change them. You should be at least somewhat familiar with XML format to continue. In the first section you have the asset title of the weapon and some attributes: allowInterrupt '''lets GunApp know whether the animations of this weapon should be forced to complete before allowing other animations... for example when you click on most of the hand guns, usually you can tap-tap-tap and they go blam-blam-blam, that's allowInterrupt ="true". On other weapons such as the hairspray flamethrower, if you tap-tap-tap the weapon won't react if an animation is already playing. For the user input to cause it to change the weapon has to be idling; this is allowInterrupt ="false". Burst, reload, and intro animations are always false, and can never be interrupted. '''allowSoundOverlap '''tells GunApp whether sounds for this weapon should be cut off between animations. Usually you want this to true. An example where you would want false is if your sound is very long and your animations very short, in which case the sounds would overlap too much and possibly create a cacophany of sounds. --- The following section can be used to spawn particles around during your animations, this is how many visual effects in GunApp are created. In the 'emitters' section you establish what emitters should exist for the weapon. Then in the 'frame' sections you can call on the emitters you set here to emit. '''id' '''is a number assigned to the emitter, you can use this later for calling spawns from it, id's should be in order and not duplicated or skipped. '''name' '''is the file name of the emitter image, in this case the file name is drawnGun.projectile.png '''blend 1=none(draw the whole quad) 2=transparent 3=add 4=multiply... having any other values will crash GunApp. This is how to draw the emitter. 2 means alpha blending (use transparency): --- The following can be set to allow/disallow certain firing modes. SwitchPosX and SwitchPosY sets the location of the switch button on the screen in pixels from the top left of the screen. Make sure you have at least 1 enabled! 0 1 1 --- In the weapon XML you will an 'animations' section, and in that section you will find the animations and frames that move the weapon around on the screen. Here are all the recognized animations and how GunApp uses them: --- in an animation 'frame' you might see 'spawn' : Spawn means spawn a particle on this frame. There can be multiple spawns on a single frame. --- On a you might also see a 'netSend' attribute. netSend is the call to send a network message to other devices running GunApp so that we can have multiplayer impact effects. The message will be sent any time this frame is played. You can add netSend to any frame you want, but be careful not to send these very often as to not flood your network. Here is a chart that maps what number corresponds to what impact effect.